package com.zhichat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhichat.entity.GroupInfoEntity;
import com.zhichat.web.api.PageUtils;
import com.zhichat.web.dto.AddOrRemoveMemberDTO;
import com.zhichat.web.dto.AdminGroupQueryDTO;
import com.zhichat.web.dto.GroupInfoAddOrUpdateDTO;
import com.zhichat.web.vo.AdminGroupInfoVO;
import com.zhichat.web.vo.GroupDetailAndMembersVO;
import com.zhichat.web.vo.GroupDetailVO;
import com.zhichat.web.vo.GroupListVO;

import java.io.IOException;
import java.util.List;

/**
 * 群信息表
 *
 * @author zqli
 * @email lzq@hello.com
 * @date 2024-11-09 22:14:14
 */
public interface GroupInfoService extends IService<GroupInfoEntity> {

    Boolean createGroup(GroupInfoAddOrUpdateDTO dto) throws IOException;

    Boolean updateGroup(GroupInfoAddOrUpdateDTO dto) throws IOException;

    List<GroupListVO> listGroup();

    GroupDetailVO detail(Long groupId);

    GroupDetailAndMembersVO detailAndMembers(Long groupId);

    PageUtils<AdminGroupInfoVO> groupListOfAdmin(AdminGroupQueryDTO dto);

    boolean disbandGroupByAdmin(Long groupId, Long groupOwnerId);

    boolean addOrRemoveMember(AddOrRemoveMemberDTO dto);

    boolean quitGroup(Long groupId);

    boolean disbandSelfGroup(Long groupId);
}

